﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bookkeeping.Tests.Utilities
{
    public class CollectionHelper
    {
        public static bool AreEqual<T>(IEnumerable<T> expected, IEnumerable<T> actual)
        {
            var expectedList = expected.ToList();
            var actualList = actual.ToList();

            if (expectedList.Count != actualList.Count)
                return false;

            for (int i = 0; i < expectedList.Count; i++)
            {
                if (!expectedList[i].Equals(actualList[i]))
                    return false;
            }

            return true;
        }
    }
}
